# from django.shortcuts import render
# from django.http import HttpResponse,JsonResponse
# import os,json
# import uuid

# # Create your views here.
# def get_image(request):
#     if request.method == "POST":
#         image = request.FILES['file']
#         uuid1 = uuid.uuid4()
#         basedir = '/home/seal/st/backend/static/'
#         path = basedir +'images/'
#         if not os.path.exists(path + "%s" % uuid1 +'.jpg'):
#             with open(path+ "%s" % uuid1 +'.jpg','wb') as f:
#                 f.write(image.read())
#                 f.close()
#             # def url = '121.41.107.81:28001/static/images/' + uuid +'.jpg'
#             # return url
#             return HttpResponse("上传成功")
#         return HttpResponse("重复")
#     if request.method != "POST": 
#         return HttpResponse("NOT POST")
    
# def text(request):
#     post_data = request.body
#     data = json.loads(post_data)
#     text = data['text']
#     return HttpResponse(text)
